program Main
use mpmodule

integer :: i = 1
type(mp_real) benadering,exact
call mpinit(2000)
benadering = mpreal('0.9789')
exact = exp(log(MPPIC/2)/13);
!Newton-Raphson
do i=1,15
!call mpwrite(6,(benadering-exact)/exact)
print *, floor(dble(-log10(abs((benadering-exact)/exact))))
benadering = benadering - (cos(benadering**13))/(-13*benadering**12*sin(benadering**13))
enddo
call mpwrite(6,exact)
	

end program
